package cn.kgc.dto;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.*;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;

import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 品牌(PmsBrand)表实体类
 *
 * @author 石浩杰
 * @since 2022-11-27 13:39:56
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel
@SuppressWarnings("serial")
public class PmsBrandAddDTO implements Serializable {


    /**
     * @NotNull: 不能为Null
     * @NotEmpty: 集合元素上
     * @NotBlank: 字符串上
     * @Length: 长度验证
     * @Pattern: 正则表达式验证
     * @Min: 最小值
     * @Max: 最大值
     */
    
    @ApiModelProperty(name = "name",value = "品牌名",dataType = "java.lang.String")
    @NotBlank(message = "name:品牌名不能为空")
    @Length(max = 50,message = "name:品牌名字符长度小于50")
    private String name;    //品牌名
    
    @ApiModelProperty(name = "logo",value = "品牌logo地址",dataType = "java.lang.String")
    private String logo;    //品牌logo地址
    
    @ApiModelProperty(name = "descript",value = "介绍",dataType = "java.lang.String")
    private String descript;    //介绍
    
    @ApiModelProperty(name = "firstLetter",value = "检索首字母",dataType = "java.lang.String")
    @Pattern(regexp = "[a-zA-Z]{1}",message = "firstLetter:检索首字母只能是a-z或者是A-Z之间的字母，且长度必须是1")
    private String firstLetter;    //检索首字母
    
    @ApiModelProperty(name = "sort",value = "排序",dataType = "java.lang.Integer")
    @Min(value = 0,message = "sort:排序最小值为0")
    @Max(value = 10,message = "sort:排序的最大值是10")
    private Integer sort;    //排序

    private List<Long> categoryIds=new ArrayList<>();    //品牌对应的分类id集合
}
